package com.guigu.www.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
@TableName("s_pay")
public class Pay {

    @TableId(value ="id",type= IdType.AUTO)
    private Integer id;                 //序号

    @TableField("pay_id")
    private String  payId;          //出库单编号

    private String  storer;         //出库人

    private String  reason;     //出库理由 C002-1: 生产领料  C002-2: 赠送  C002-3: 内部借领    C002-4: 其他借领

    private String  reasonexact;        //出库详细理由

    @TableField("amount_sum")
    private String  amountSum;          //总件数

    @TableField("cost_price_sum")
    private String  costPriceSum;       //总金额

    @TableField("paid_amount_sum")
    private String  paidAmountSum;          //确认出库总件数

    private String  remark;             //备注

    private String  register;           //登记人

    @TableField("register_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
    private Date registerTime;       //登记时间

    private String  checker;            //复核人

    @TableField("check_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
    private Date  checkTime;          //复核时间

    @TableField("check_tag")
    private String  checkTag;       //审核标志 S001-0: 等待审核     S001-1: 审核通过  S001-2: 审核不通过

    private String  attemper;       //调度人

    @TableField("attemper_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
    private Date  attemperTime;       //调度时间

    @TableField("pay_tag")
    private String  payTag;         //库存标志 K002-1: 已登记  K002-2: 已调度

    //登记复核人
    private String registrationreviewer;

    //登记复核时间
    private String timeregistrationreviewer;
    //明细表
    @TableField(exist = false)
    private List<PayDetails> payDetails;

    //判断通过没通过
    @TableField(exist = false)
    private int rad;
    //注：
    //        1、AMOUNT_SUM为所有出库商品的件数合计，COST_PRICE_SUM为所有出库商品的金额合计
}
